﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace b1_素数
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请选择你输入数据的个数：");
            string s = Console.ReadLine();
            int num = int.Parse(s);
            int i=0;
            int number=0;
            Console.WriteLine("请输入你的数据");
            while (i < num)
            {
                s = Console.ReadLine();
                if (isprime(int.Parse(s)) == true)
                    number++;
                i++;
            }
            Console.WriteLine(number.ToString());
        }
        static bool isprime(int a)
        {
            if (a == 0 || a == 1)
                return false;
            int i = 2;
            for (i = 2; i < a; i++)
            {
                if (a % i == 0)
                    return false;
            }
            return true;
        }
    }
}
